﻿''' <summary>
''' 实时报警记录Model
''' </summary>
''' <remarks></remarks>
Public Class RealtimeAlarmItem

    Private _id As Integer
    Public Property ID() As Integer
        Get
            Return _id
        End Get
        Set(ByVal value As Integer)
            _id = value
        End Set
    End Property


    Private _name As String
    ''' <summary>
    ''' 
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Property Name() As String
        Get
            Return _name
        End Get
        Set(ByVal value As String)
            _name = value
        End Set
    End Property

    Private _netID As Byte
    Public Property netID() As Byte
        Get
            Return _netID
        End Get
        Set(ByVal value As Byte)
            _netID = value
        End Set
    End Property

    Private _strTime As String
    Public Property strTime() As String
        Get
            Return _strTime
        End Get
        Set(ByVal value As String)
            _strTime = value
        End Set
    End Property

    Private _typeID As Byte
    Public Property typeID() As Byte
        Get
            Return _typeID
        End Get
        Set(ByVal value As Byte)
            _typeID = value
            '_typeName = Me.GetTypeName(value)
        End Set
    End Property


    Private _typeName As String
    Public Property typeName() As String
        Get
            Return _typeName
        End Get
        Set(ByVal value As String)
            _typeName = value
        End Set
    End Property


    Private _AlarmLevel As Integer
    Public Property level() As Integer
        Get
            Return _AlarmLevel
        End Get
        Set(ByVal value As Integer)
            _AlarmLevel = value
            _alarmLevelName = Me.GetLevelName(value)
        End Set
    End Property


    Private _alarmLevelName As String
    Public Property levelName() As String
        Get
            Return _alarmLevelName
        End Get
        Set(ByVal value As String)
            _alarmLevelName = value
        End Set
    End Property


    Private _isValid As Boolean
    Public Property IsValid() As Boolean
        Get
            Return _isValid
        End Get
        Set(ByVal value As Boolean)
            _isValid = value
        End Set
    End Property

    Private _Confirmed As Boolean
    Public Property confirmed() As Boolean
        Get
            Return _Confirmed
        End Get
        Set(ByVal value As Boolean)
            _Confirmed = value
        End Set
    End Property

    'Private Function _del_GetTypeName(ByVal id As Integer) As String
    '    Dim typeName As String = ""
    '    Select Case id
    '        Case 100
    '            typeName = "1#温度超高限报警"
    '        Case 101
    '            typeName = "1#温度超低限报警"
    '        Case 102
    '            typeName = "1#湿度度超高限报警"
    '        Case 103
    '            typeName = "1#湿度度超低限报警"

    '        Case 104
    '            typeName = "2#温度超高限报警"
    '        Case 105
    '            typeName = "2#温度超低限报警"
    '        Case 106
    '            typeName = "2#湿度度超高限报警"
    '        Case 107
    '            typeName = "2#湿度度超低限报警"

    '        Case 108
    '            typeName = "3#温度超高限报警"
    '        Case 109
    '            typeName = "3#温度超低限报警"
    '        Case 110
    '            typeName = "3#湿度度超高限报警"
    '        Case 111
    '            typeName = "3#湿度度超低限报警"


    '        Case 112
    '            typeName = "4#温度超高限报警"
    '        Case 113
    '            typeName = "4#温度超低限报警"
    '        Case 114
    '            typeName = "4#湿度度超高限报警"
    '        Case 115
    '            typeName = "4#湿度度超低限报警"

    '        Case 116
    '            typeName = "5#温度超高限报警"
    '        Case 117
    '            typeName = "5#温度超低限报警"
    '        Case 118
    '            typeName = "5#湿度度超高限报警"
    '        Case 119
    '            typeName = "5#湿度度超低限报警"

    '        Case 120
    '            typeName = "6#温度超高限报警"
    '        Case 121
    '            typeName = "6#温度超低限报警"
    '        Case 122
    '            typeName = "6#湿度度超高限报警"
    '        Case 123
    '            typeName = "6#湿度度超低限报警"

    '        Case 124
    '            typeName = "7#温度超高限报警"
    '        Case 125
    '            typeName = "7#温度超低限报警"
    '        Case 126
    '            typeName = "7#湿度度超高限报警"
    '        Case 127
    '            typeName = "7#湿度度超低限报警"

    '        Case 128
    '            typeName = "8#温度超高限报警"
    '        Case 129
    '            typeName = "8#温度超低限报警"
    '        Case 130
    '            typeName = "8#湿度度超高限报警"
    '        Case 131
    '            typeName = "8#湿度度超低限报警"

    '        Case 132
    '            typeName = "冷库缺项报警"

    '        Case 133
    '            typeName = "tbcc-1温度超高限报警"
    '        Case 134
    '            typeName = "tbcc-1温度超低限报警"
    '        Case 135
    '            typeName = "tbcc-2温度超高限报警"
    '        Case 136
    '            typeName = "tbcc-2温度超低限报警"
    '        Case 137
    '            typeName = "tbcc-3温度超高限报警"
    '        Case 138
    '            typeName = "tbcc-3温度超低限报警"
    '        Case 139
    '            typeName = "tbcc-4温度超高限报警"
    '        Case 140
    '            typeName = "tbcc-4温度超低限报警"
    '        Case 141
    '            typeName = "tbcc-5温度超高限报警"
    '        Case 142
    '            typeName = "tbcc-5温度超低限报警"
    '        Case 143
    '            typeName = "tbcc-6温度超高限报警"
    '        Case 144
    '            typeName = "tbcc-6温度超低限报警"
    '        Case 145
    '            typeName = "tbcc-7温度超高限报警"
    '        Case 146
    '            typeName = "tbcc-7温度超低限报警"
    '        Case 147
    '            typeName = "tbcc-8温度超高限报警"
    '        Case 148
    '            typeName = "tbcc-8温度超低限报警"
    '        Case 149
    '            typeName = "tbcc-9温度超高限报警"
    '        Case 150
    '            typeName = "tbcc-9温度超低限报警"

    '        Case 151
    '            typeName = "tbcc-1湿度超高限报警"
    '        Case 152
    '            typeName = "tbcc-1湿度超低限报警"
    '        Case 153
    '            typeName = "tbcc-2湿度超高限报警"
    '        Case 154
    '            typeName = "tbcc-2湿度超低限报警"
    '        Case 155
    '            typeName = "tbcc-3湿度超高限报警"
    '        Case 156
    '            typeName = "tbcc-3湿度超低限报警"

    '    End Select
    '    Return typeName
    'End Function

    ''' <summary>
    ''' 根据报警级别ID返回报警级别名称
    ''' </summary>
    ''' <param name="id"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Private Function GetLevelName(ByVal id As Integer) As String
        Dim levelName As String = ""
        Select Case id
            Case 1
                levelName = "严重"
            Case 2
                levelName = "普通"
            Case 3
                levelName = "警告"

        End Select
        Return levelName
    End Function

   

End Class
